{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <style>
		@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width:1024px)  {
		#mytable, #mytable thead, #mytable tbody, #mytable th, #mytable td, #mytable tr { 
			display: block; 
		}
		#mytable thead tr { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		#mytable td { 
			border: none;
			border-bottom: 1px solid #eee; 
			position: relative;
			padding-left:44% !important; 
			padding-top:10px ;
		}
	    #mytable tr{ margin-bottom:20px;}
		#mytable td:before { 
			position: absolute;
			top:10px;
			left:8px;
			width: 45%; 
			padding-right:10px;
			white-space: nowrap;
		}
		    #mytable td:nth-of-type(1):before { content: "编号"; }
			#mytable td:nth-of-type(2):before { content: "姓名"; }
			#mytable td:nth-of-type(3):before { content: "变动事项"; }
			#mytable td:nth-of-type(4):before { content: "日期"; }
			#mytable td:nth-of-type(5):before { content: "源单位"; }
			#mytable td:nth-of-type(6):before { content: "目的单位"; }
			#mytable td:nth-of-type(7):before { content: "备注"; }
			#mytable td:nth-of-type(8):before { content: "操作"; }
        }		
	</style>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
            
                <div class="box-header with-border">
                    <span class="fa fa-pencil" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">人事变动列表</p>
                   <!-- <a style="float:right; color:#fff;" class=" btn btn-warning btn-sm" href="index.php?a=change.outdata&staff_external={%$staff_external%}">导出</a>-->
				 </div>
                <div class="box-body">
				 <form name="form1" action="" method="get">
                    <div class="col-md-3 form-group">
                              <label class="col-sm-5 control-label text-right" style="padding:0;">
                                   教师姓名：
                              </label>
                              <div class="input-group col-sm-7 col-xs-12">
                                      <input type="text" class="form-control" name="staff_name" value="{%$staff_name%}">
                              </div> 
                        </div>
					<div class="col-sm-6 col-xs-12 form-group">
						  <label for="inputPassword3" class="col-sm-2 control-label text-right">
							   时间：
						  </label>
						  <div class="input-group col-sm-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-sm-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-sm-1 col-xs-12">
						<input type="hidden" name="personnel_type" value="{%$personnel_type%}">
						<input type="hidden" name="a" value="change.list">
					    <button type="submit" class="btn btn-warning text-left">查 询</button>
					</div>
					</form>
					<div style="clear:both; height:3px;"></div>
					<p>人事变动记录共<span> {%$count%} </span>条</p>
                     <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style="background-color:#a273ff;">
                                        <td>编号</td>
                                        <td>姓名</td>
										<td>变动事项</td>
                                        <td>日期</td>
										<td>源单位</td>
                                        <td>目的单位</td>
                                        <td>在岗信息</td>
										<td>备注</td>
                            
                                    </tr>	
                                </thead>

                                <tbody>
                                {%foreach from=$staff_lists key=key item=value%}
                                    <tr>
                                        <td>{%$value.staff_number%}</td>
                                        <td>{%$value.staff_name%}</td>
										<td>{%$value.personnel_variation%}</td>
                                        <td>{%$value.start_time%}</td>
										<td>{%$value.personnel_from%}</td>
                                        <td>{%$value.personnel_to%}</td>
										<td>{%$value.staff_sign%}</td>
										<td>{%$value.personnel_remark%}</td>
                   
                                    </tr>	
                                   {%/foreach%}
                            </tbody>
                        </table>
                        {%$page%}
				   </div><!--box-body -->

           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
   {%include file="index.footer.tpl.php"%}
  <script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>